package StreamOf;

import java.util.stream.Stream;

/**
 * @author zc
 * @version 1.0
 * @date 2021/9/24 11:36
 */

//使用Stream的静态方法
public class Test4 {
    public static void main(String[] args) {
//        Stream<Integer> stream = Stream.of(1,2,3,4,5,6);
//        stream.forEach(e -> System.out.println(e));


//        Stream<Integer> stream1 = Stream.iterate(0, (x) -> x + 3).limit(7);
//        stream1.forEach(e -> System.out.print(e+" "));

//        Stream<Double> stream3 = Stream.generate(Math::random).limit(2);
//        stream3.forEach(System.out::println);
    }
}
